<%-- 
    Document   : index
    Created on : 30 Jun, 2013, 9:21:10 AM
    Author     : Yash
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Ecart.com! India's No.1 Shipping portal!</title>
        <script src="jquery-1.9.1.js"></script>
        <%--<script>

            function validateForm()
            {
                var x = $('#cemail').text(); 
                /* here for access the id,u have to use # and if you want to access
                class then u have to use . */
                
                var atpos = x.indexOf("@");
                var dotpos = x.lastIndexOf(".");

                
                if (atpos < 1 || dotpos < atpos + 2 || dotpos + 2 >= x.length)
                {
                   
                    $("#error_msg").text("Not a valid e-mail address");
                    return false;
                }

                return true;
            }
        </script>
        --%>
   </head>
    <body style='background-color:aquamarine '>
        <div style="background-color:rgba(10%,30%,50%,0.5);box-shadow:0px 0px 80px yellow;border-radius: 20% 20% 0% 0%">

            <h1 style="font-family: Segoe Print;font-weight: bolder;outline: darkorange;outline-width: thick"> Welcome to Ecart!</h1>
            <address> we serve better.</address>
            <hr style="color: brown;border-width: thick"/>
        </div>


        <div style="position: absolute;margin-top: 20%;margin-right: 80%;margin-bottom: 10%;background-color: tomato">

            <div id="error_div" style="
                 position: fixed;
                 width: 466px;
                 height: 100px;
                 margin-top: -69px;
                 ">
                <span id="error_msg">
                    
                </span>
           </div>
        </div>

        <div style="margin-left: 20%;margin-right: 20%;margin-bottom: 10%">


            <form action="LoginAction.do" method="POST" name="loginform" onsubmit="return validateForm()">

                <h3><c:out value="${sessionScope.msg}"></c:out></h3>
                <c:remove var="msg" scope="session"></c:remove>
                <table align="center" style="background-color:rgba(50%,30%,20%,0.5);box-shadow:0px 0px 80px white;border-radius: 0% 20% 0% 20%;">

                    <th colspan="2"><h2 style="color:brown;text-shadow:10px 10px 3px grey"> Login Now!</h2></th>
                    <tr>
                        <td> Enter email address: </td>
                        <td> <input type="text" name="cemail" id="cemail"/> <br/> </td>

                    </tr>
                    <tr> 
                        <td> Enter Password : </td>
                        <td> <input type="password" name="cpassword" id="cpassword"/> <br/> </td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp; 
                            <input type="submit" value="Login"/> <br/> </td>
                        <td> <a href="signup.jsp">Sign up</a> </td>
                    </tr>
                    <tr> 


                    </tr>
                    <tr>
                        <td>

                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="forgotpassword.jsp">Forgot Password </a> </td>
                    </tr>

                </table>

        </div>

        <div style="margin-top: 40%;background-color: cornflowerblue;position:absolute ">

            <address>
                All rights reserved. Copyright 2013. @Ecart Portal
            </address>
        </div>
        <!--            <div id="timer">
                        
                    </div>-->
    </form>
    <!--        <script>
                var counter=100;
                var t;
                window.onload=function(){
                    t=setInterval(function(){
                        if(counter<0){
                            window.location.href="http://www.google.com";
                        }
                        counter--;
                        document.getElementById("timer").innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;             "+counter;
                    },1000);
                }
            </script>-->
</body>
</html>
